TOPDIR = $(shell pwd)
export TOPDIR




include Makefile.include

# list of used sourcefiles
SRCS = main.cpp

OBJS = $(SRCS:.cpp=.o)

SDK_CFLAGS += -Iinclude -I../../include


# name of the output executable
TARGET = IPCamera-demo

# MACRO for cleaning object -files
RM  = rm -f


all : core audio video $(OBJS)
	$(CC) $(OBJS)  $(INTERNAL_LIBS) $(EXTENAL_LIBS)  -o $(TARGET) $(LDFLAGS) -L$(TOPDIR)/internelLib -L../../lib

core : 
	make -C core

audio :
	make -C audio 
	
video:
	make -C video
	
	
main.o : main.cpp
	$(CC) $(CFLAGS) $(SDK_CFLAGS) -c -o main.o main.cpp
	
clean:
	make -C audio clean
	make -C video clean
	make -C core clean
	$(RM) *.o 
	$(RM)  $(TARGET)
	$(RM)  $(INTERNAL_LIBS)

        
.PHONY: clean core audio video

	




